require 'yaml'

class Enviroment
	
	@@configs = nil	
	
	def Enviroment.init(env)
		env = "staging" if env.nil?
		File.open("config.yml") do |f|
			hash = YAML.load(f)
			@@configs = hash.values_at(env)[0]
			raise ArgumentError.new("Invalid env [#{env}], availabile envs [#{hash.keys.join(', ')}]") if @@configs.nil? 
		end	
	end

	def self.configs
		@@configs
	end


end
